<?php
require_once('admin_operador.php');
class Operador_Controller extends Admin_Operador
{
    public $esOperador = false;

    public function Operador_Controller() {

        // treated as constructor in PHP 5.3.0-5.3.2
        // treated as regular method as of PHP 5.3.3
        parent::__construct();

        //$datosSession = $this->session->all_userdata();
        //print_r($datosSession,false);
       // $this->esOperador = $datosSession['es_operador'];

    }

    function index()
    {
        if($this->puede_acceder()==true)
        {
        //$datosSession = $this->session->all_userdata();
        //print_r($datosSession,false);
       }
    }
    function puede_acceder()
    {

        if ($this->esOperador == false )
        {
            //loading principal view
            $data['main_content'] = 'principalM';
            $this->load->view('includes/template', $data);
        }
        return $this->esOperador;
    }
}
